package com.concurrency.example.singleton;

/**
 * 饿汉模式，单例实例在类装载的时候进行创建，是线程安全的
 */
public class SingletonExample5 {
    private SingletonExample5(){}

    private static SingletonExample5 instance = new SingletonExample5();

    public SingletonExample5 getInstance(){
        return instance;
    }
}
